
#include "libmath.h"

namespace p2 {

template<> const real32 Math<real32>::EPSILON = FLT_MAX;
template<> const real32 Math<real32>::ZERO_TOLERANCE = 1e-06f;
template<> const real32 Math<real32>::ZERO_TOLERANCE2 = Math<real32>::ZERO_TOLERANCE
	* Math<real32>::ZERO_TOLERANCE;
template<> const real32 Math<real32>::MAX_REAL = FLT_MAX;
template<> const real32 Math<real32>::PI = (real32) (4.0 * atan(1.0));
template<> const real32 Math<real32>::TWO_PI = 2.0f * Math<real32>::PI;
template<> const real32 Math<real32>::HALF_PI = 0.5f * Math<real32>::PI;
template<> const real32 Math<real32>::INV_PI = 1.0f / Math<real32>::PI;
template<> const real32 Math<real32>::INV_TWO_PI = 1.0f / Math<real32>::TWO_PI;
template<> const real32 Math<real32>::DEG_TO_RAD = Math<real32>::PI / 180.0f;
template<> const real32 Math<real32>::RAD_TO_DEG = 180.0f / Math<real32>::PI;
template<> const real32 Math<real32>::LN_2 = Math<real32>::Log(2.0f);
template<> const real32 Math<real32>::LN_10 = Math<real32>::Log(10.0f);
template<> const real32 Math<real32>::INV_LN_2 = 1.0f / Math<real32>::LN_2;
template<> const real32 Math<real32>::INV_LN_10 = 1.0f / Math<real32>::LN_10;
template<> const real32 Math<real32>::SQRT_2 = (real32) (sqrt(2.0));
template<> const real32 Math<real32>::INV_SQRT_2 = 1.0f / Math<real32>::SQRT_2;
template<> const real32 Math<real32>::SQRT_3 = (real32) (sqrt(3.0));
template<> const real32 Math<real32>::INV_SQRT_3 = 1.0f / Math<real32>::SQRT_3;

template<> const real64 Math<real64>::EPSILON = DBL_EPSILON;
template<> const real64 Math<real64>::ZERO_TOLERANCE = 1e-08;
template<> const real64 Math<real64>::ZERO_TOLERANCE2 = Math<real64>::ZERO_TOLERANCE
	* Math<real64>::ZERO_TOLERANCE;
template<> const real64 Math<real64>::MAX_REAL = DBL_MAX;
template<> const real64 Math<real64>::PI = 4.0 * atan(1.0);
template<> const real64 Math<real64>::TWO_PI = 2.0 * Math<real64>::PI;
template<> const real64 Math<real64>::HALF_PI = 0.5 * Math<real64>::PI;
template<> const real64 Math<real64>::INV_PI = 1.0 / Math<real64>::PI;
template<> const real64 Math<real64>::INV_TWO_PI = 1.0 / Math<real64>::TWO_PI;
template<> const real64 Math<real64>::DEG_TO_RAD = Math<real64>::PI / 180.0;
template<> const real64 Math<real64>::RAD_TO_DEG = 180.0 / Math<real64>::PI;
template<> const real64 Math<real64>::LN_2 = Math<real64>::Log(2.0);
template<> const real64 Math<real64>::LN_10 = Math<real64>::Log(10.0);
template<> const real64 Math<real64>::INV_LN_2 = 1.0 / Math<real64>::LN_2;
template<> const real64 Math<real64>::INV_LN_10 = 1.0 / Math<real64>::LN_10;
template<> const real64 Math<real64>::SQRT_2 = sqrt(2.0);
template<> const real64 Math<real64>::INV_SQRT_2 = 1.0f / Math<real32>::SQRT_2;
template<> const real64 Math<real64>::SQRT_3 = sqrt(3.0);
template<> const real64 Math<real64>::INV_SQRT_3 = 1.0f / Math<real32>::SQRT_3;

} /* namespace p2 */
